﻿<UserControl x:Class="Silverlight4Netflix.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="480" d:DesignWidth="640" Loaded="MainPage_Loaded" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" Background="Black" HorizontalAlignment="Center" VerticalAlignment="Top">
    <Canvas Name="MainCanvas" Background="#FFFF0008" Width="640" Height="480">
        <Image Canvas.Left="0" Canvas.Top="0" Height="71" Name="netflixLogoImage" Stretch="Fill" Width="165" Opacity="1" Source="/Silverlight4Netflix;component/Images/netflix_primary_api_logo1.png" />
        <TextBlock Canvas.Left="12" Canvas.Top="77" Height="23" Name="textBlock1" Text="Choose Genre:" Width="111" Foreground="White" FontFamily="Lucida Sans Unicode" FontSize="14" />
        <ComboBox Canvas.Left="118" Canvas.Top="77" Height="23" Name="GenreCombobox" Width="490" ItemsSource="{Binding}" SelectionChanged="GenreCombobox_SelectionChanged">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Margin="0,3,3,0">
                        <TextBlock Width="Auto"
                           Text="{Binding Path=Name}"
                           VerticalAlignment="Center" FontSize="14" Visibility="Visible"  />
                    </StackPanel>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
        <ListBox Canvas.Left="12" Canvas.Top="111" Height="283" Name="CatalogTitleListBox" Width="596" ItemsSource="{Binding}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="{Binding BoxArt.MediumUrl}"  />
                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="{Binding Name}" FontSize="14" FontFamily="Lucida Sans Unicode" FontWeight="Bold"></TextBlock>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock>Rated:</TextBlock>
                                <TextBlock Text="{Binding Rating}" FontSize="12" FontFamily="Lucida Sans Unicode"></TextBlock>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock>Release Year:</TextBlock>
                                <TextBlock Text="{Binding ReleaseYear}" FontSize="12" FontFamily="Lucida Sans Unicode"></TextBlock>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock>Average User Rating:</TextBlock>
                                <TextBlock Text="{Binding AverageRating}"></TextBlock>
                                <TextBlock> /5</TextBlock>
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <Button Canvas.Left="474" Canvas.Top="400" Content="See More Titles" Height="23" Name="MoreTitlesButton" Width="134" Click="MoreTitlesButton_Click" />
        <TextBlock Canvas.Left="172" Canvas.Top="227" Height="45" Name="LoadingTextBlock" Text="Loading Titles" Width="262" FontSize="26" TextAlignment="Center" FontStretch="ExtraExpanded" Foreground="#FFEE3424" Visibility="Visible" Opacity="1" />
        <sdk:Label Canvas.Left="129" Canvas.Top="77" Height="28" Name="LoadingGenresLabel" Width="120" Content="Loading..." />
        <HyperlinkButton Canvas.Left="0" Canvas.Top="0" Height="71" Name="hyperlinkButton1" Width="165" NavigateUri="http://www.netflix.com/" TargetName="_blank" />
        <Image Canvas.Left="250" Canvas.Top="409" Height="59" Name="image1" Stretch="Fill" Width="196" Source="/Silverlight4Netflix;component/Images/silverlight-logo.png" />
        <Image Canvas.Left="12" Canvas.Top="411" Height="57" Name="image2" Stretch="Fill" Width="200" Source="/Silverlight4Netflix;component/Images/OData-logo.png" />
    </Canvas>
</UserControl>
